package com.baizhi.service.ServiceImpl;
import com.baizhi.dao.AtricleDao;
import com.baizhi.entity.Article;
import com.baizhi.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2019/4/12.
 */
@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    private AtricleDao atricleDao;


    @Override
    public Map selectGuruArticle(Integer userId) {
        Map map=new HashMap();
        List<Article> articles=atricleDao.selectGuruArticle(userId);
        map.put("articles",articles);
        return map;
    }

    @Override
    public Map selectAllArticle() {
        Map map=new HashMap();
        List<Article> articles=atricleDao.appSelectAllArticle();
        map.put("articles",articles);
        return map;
    }


}
